<template>
  <div>
    <div class="blank_down"></div>
    <div class="wrap">
      <div class="left">
        <div><img src="~assets/images/finger.png"></div>
        <div class="left-text">
          <span class="font">国泰君安君弘</span>
          <span class="font little">海量数据，智能算法，让炒股更简单</span>
        </div>
      </div>
      <div class="right" @click.stop="download">下载</div>
    </div>
  </div>

</template>

<script>
    const TDAPP = window.TDAPP
    export default {
      name: 'DownLoad',
      data () {
        return {
        }
      },
      props: {
        page: {
          type: String
        },
        stock: {
          type: String,
          default: ''
        }
      },
      methods: {
        download () {
          let tdId = ''
          let object = {}
          if (this.page === 'index') {
            tdId = '004016'
          } else if (this.page === 'stock') {
            tdId = '004021'
            object = {stockCode: this.stock}
          }
          TDAPP.onEvent(tdId, '', object)
          TDAPP.send()
          window.location.href = 'https://yyz.gtja.com/dl/'
        }
      }
    }
</script>

<style>
.blank_down{
  width: 100%;
  height: 132px;
}
.wrap{
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: white;
  width: 100%;
  height: 122px;
  margin-top: 10px;
  box-shadow: 0 -5px 10px 5px #dddddd;
  position: fixed;
  bottom: 0;
}
.left{
  margin-left: 30px;
  display: flex;
  align-items: center;
}
.left .left-text{
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.font{
  font-size: 32px;
  margin-bottom: 5px;
  margin-left: 20px;
  align-self: baseline;
}
.little{
  font-size: 24px;
  color: #999;
}
.left img{
  width: 90px;
  height: 90px;
}
  .right{
    margin-right: 50px;
    width: 120px;
    height: 60px;
    border-radius: 8px;
    background-color: #309fea;
    text-align: center;
    line-height: 60px;
    color: white;
  }
</style>
